﻿using UnityEngine;

namespace HEFramework
{
    public static class BuildingSystem
    {
        [EntitySystem]
        public class BuildingAwakeSystem : AwakeSystem<Building, int>
        {
            protected override void Awake(Building _self, int _id)
            {
                _self.ID = _id;

                _self.AddChild<AttributeComponent, int, int>(_id, 0);
                _self.AddChild<TransformComponent>();
                _self.AddChild<DeathComponent>();
                _self.AddChild<AlertComponent, int>(0);
                _self.AddChild<ATKComponent>();
                _self.AddChild<RecoverComponent>();
                _self.AddChild<SkillComponent>();

                _self.AddChild<BuildingView>();
            }
        }
    }
}